package com.example.tests;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.MatcherAssert.*;

import java.util.Random;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderRemoving extends TestBase {
       
        @Test
        public void testFolderRemoving() {
            Folders oldFolders = app.getFolderHelper().getFolders();
            int index = new Random().nextInt(oldFolders.length());
            app.getFolderHelper().deleteFolder(index);
            Folders newFolders = app.getFolderHelper().getFolders();
            assertThat(newFolders, equalTo(oldFolders.withoutDeleted(index)));
    }

}

